import request from '@/utils/request'

export function page({id,category,remark,page,pageSize}) {
    return request({
        url: 'GoodsCategory/page',
        method: 'get',
        params: {
            id,
            category, 
            remark,
            page,
            pageSize
        }
    })
}
export function addCategory(goodsCategory) {
    return request({
        url: 'GoodsCategory/save',
        method: 'post',
        data: goodsCategory,
    })
}

export function getById(id) {
    return request({
        url: 'GoodsCategory/'+id,
        method: 'delete',
    })
}

export function selectById(id) {
    return request({
        url: 'GoodsCategory/'+id,
        method: 'get',
    })
}

export function update(goodsCategory) {
    return request({
        url: 'GoodsCategory/update',
        method: 'put',
        data : goodsCategory
    })
}

export function getByCategory(params) {
    return request({
        url: 'GoodsCategory/category',
        method: 'get',
        data:params
    })
}
